import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class ImageCopy {
    //将tmp/image/test.png 复制到 当前目录下
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("MyFile\\src\\tmp\\image\\test.jpg");
        FileOutputStream fos = new FileOutputStream("MyFile\\src\\tmp\\copy.jpg");
        byte[] bytes = new byte[1024];
        int len ;
        while((len = fis.read(bytes)) != -1){
            fos.write(bytes ,0,len);
        }
        fis.close();
        fos.close();
    }


}
